
package com.faxsun.core.order.dao;

import com.faxsun.profile.core.domain.FSReferralCustomerOrderItemXref;
import com.faxsun.profile.core.domain.FSReferralStatusEnum;
import org.broadleafcommerce.core.catalog.domain.Category;
import org.broadleafcommerce.core.catalog.domain.Product;
import org.broadleafcommerce.core.catalog.domain.Sku;
import org.broadleafcommerce.core.order.dao.OrderItemDao;
import org.broadleafcommerce.core.order.domain.OrderItem;
import org.broadleafcommerce.core.order.domain.OrderItemAttribute;
import org.broadleafcommerce.core.order.service.type.OrderStatus;
import org.broadleafcommerce.profile.core.domain.Customer;

import java.util.EnumSet;
import java.util.List;
import java.util.Map;

public interface FSOrderItemDao extends OrderItemDao {

    public Long readOrderItemQuantitiesByCustomerAndCategory(Customer customer, Category category);

    public List<OrderItem> readOrderItemsByCustomerAndCategory(Customer customer, Category category);

    public List<OrderItemAttribute> readAllOrderItemAttributesBySku(Sku sku);

    public List<OrderItem> readReFoundOrderItemsByCustomer(Customer customer);

    public List<FSReferralCustomerOrderItemXref> readReferralOrderItemsByCustomer(Customer customer);

    public List<FSReferralCustomerOrderItemXref> readReferralOrderItemsByCustomer(Customer customer, EnumSet<FSReferralStatusEnum> statusEnums);

    public Map<Long, Long> readOrderItemQuantitiesByProductsAndStatus(List<Product> products, List<String> orderStatuses);
}

